home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GWMALLOC.ZIP;1 / GWMALLOC.TAR / gw_malloc / error_val.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-08  |  3.7 KB  |  92 lines

  1. /*
  2.  * global error codes for chunk allocation problems
  3.  *
  4.  * Copyright 1992 by Gray Watson and the Antaire Corporation
  5.  *
  6.  * This file is part of the malloc-debug package.
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library (see COPYING-LIB); if not, write to the
  20.  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  * The author of the program may be contacted at gray.watson@antaire.com
  23.  *
  24.  * $Id: error_val.h,v 1.2 1993/04/05 22:30:12 gray Exp $
  25.  */
  26.  
  27. #ifndef __ERROR_VAL_H__
  28. #define __ERROR_VAL_H__
  29.  
  30. /*
  31.  * malloc error codes
  32.  */
  33. #define MALLOC_NO_ERROR            0    /* no error */
  34.  
  35. /* administrative errors */
  36. #define MALLOC_BAD_SETUP        1    /* bad setup value */
  37. #define MALLOC_IN_TWICE            2    /* in malloc domain twice */
  38. #define MALLOC_BAD_ERRNO        3    /* bad errno value */
  39.  
  40. /* pointer verification errors */
  41. #define MALLOC_POINTER_NULL        4    /* pointer is not in heap */
  42. #define MALLOC_POINTER_NOT_IN_HEAP    5    /* pointer is not in heap */
  43. #define MALLOC_POINTER_NOT_FOUND    6    /* pointer not-found */
  44. #define MALLOC_POINTER_FOUND        7    /* found special pointer */
  45. #define MALLOC_BAD_FILEP        8    /* bad bblock file-name */
  46. #define MALLOC_BAD_LINE            9    /* bad bblock line-number */
  47. #define MALLOC_UNDER_FENCE        10    /* failed picket fence lower */
  48. #define MALLOC_OVER_FENCE        11    /* failed picket fence upper */
  49. #define MALLOC_WOULD_OVERWRITE        12    /* would overwrite fence */
  50.  
  51. /* allocation errors */
  52. #define MALLOC_BAD_SIZE            13    /* bad bblock size value */
  53. #define MALLOC_TOO_BIG            14    /* allocation too large */
  54. #define MALLOC_USER_NON_CONTIG        15    /* user space contig error */
  55. #define MALLOC_ALLOC_FAILED        16    /* could not get more space */
  56. #define MALLOC_BAD_SIZE_INFO        17    /* info doesn't match size */
  57.  
  58. /* free errors */
  59. #define MALLOC_NOT_ON_BLOCK        18    /* not on block boundary */
  60. #define MALLOC_ALREADY_FREE        19    /* already in free list */
  61. #define MALLOC_NOT_START_USER        20    /* not start of user alloc */
  62. #define MALLOC_NOT_USER            21    /* not user allocated */
  63. #define MALLOC_BAD_FREE_LIST        22    /* free-list mess-up */
  64. #define MALLOC_FREE_NON_CONTIG        23    /* free space contig error */
  65. #define MALLOC_BAD_FREE_MEM        24    /* bad memory pointer */
  66. #define MALLOC_FREE_NON_BLANK        25    /* free space should be 0's */
  67.  
  68. /* dblock errors */
  69. #define MALLOC_BAD_DBLOCK_SIZE        26    /* dblock bad size */
  70. #define MALLOC_BAD_DBLOCK_POINTER    27    /* bad dblock pointer */
  71. #define MALLOC_BAD_DBLOCK_MEM        28    /* bad memory pointer */
  72. #define MALLOC_BAD_DBADMIN_POINTER    29    /* bad dblock admin pointer */
  73. #define MALLOC_BAD_DBADMIN_MAGIC    30    /* bad dblock admin pointer */
  74. #define MALLOC_BAD_DBADMIN_SLOT        31    /* bad dblock slot info */
  75.  
  76. /* administrative errors */
  77. #define MALLOC_BAD_ADMINP        32    /* out of bounds */
  78. #define MALLOC_BAD_ADMIN_LIST        33    /* out of bounds */
  79. #define MALLOC_BAD_ADMIN_MAGIC        34    /* bad magic numbers */
  80. #define MALLOC_BAD_ADMIN_COUNT        35    /* bad count number */
  81. #define MALLOC_BAD_BLOCK_ADMINP        36    /* bblock adminp bad */
  82. #define MALLOC_BAD_BLOCK_ADMINC        37    /* bblock adminp->count bad */
  83.  
  84. /* heap check verification */
  85. #define MALLOC_BAD_BLOCK_ORDER        38    /* block allocation bad */
  86. #define MALLOC_BAD_FLAG            39    /* bad basic-block flag */
  87.  
  88. #define IS_MALLOC_ERRNO(e)    ((e) >= MALLOC_NO_ERROR && \
  89.                  (e) <= MALLOC_BAD_FLAG)
  90.  
  91. #endif /* ! __ERROR_VAL_H__ */
  92.